package io.kiki.sba.registry.common.model.metaserver;


import lombok.Getter;

@Getter
public class ClientManagerResult {

    public static final long FAIL_VERSION = -1L;

    private final boolean success;

    private final long version;

    public ClientManagerResult(boolean success, long version) {
        this.success = success;
        this.version = version;
    }

    public static ClientManagerResult buildSuccess(long version) {
        return new ClientManagerResult(true, version);
    }

    public static ClientManagerResult buildFailRet() {
        return new ClientManagerResult(false, FAIL_VERSION);
    }


}
